package org.hawk.gwtppc.webtest.tests.classsuite;

import org.hawk.gwtppc.webtest.common.Asserts;
import org.hawk.gwtppc.webtest.common.Test;
import org.hawk.gwtppc.webtest.tests.mock.AnnotationMock;
import org.hawk.gwtppc.webtest.tests.mock.ClassMock;
import org.hawk.gwtppc.webtest.tests.mock.EnumMock;
import org.hawk.gwtppc.webtest.tests.mock.InterfaceMock;

public class GetComponentTypeTest implements Test {

	public void run() throws Throwable {
		Asserts.assertTrue(ClassMock.class.getComponentType() == null);
		Asserts.assertTrue(InterfaceMock.class.getComponentType() == null);
		Asserts.assertTrue(EnumMock.class.getComponentType() == null);
		Asserts.assertTrue(AnnotationMock.class.getComponentType() == null);
		Asserts.assertEquals(ClassMock[].class.getComponentType(), ClassMock.class);
		Asserts.assertEquals(ClassMock[][][].class.getComponentType(), ClassMock[][].class);
		Asserts.assertEquals(long[].class.getComponentType(), long.class);
	}

	public String getName() {
		return "getComponentType()";
	}

}
